<template>
    <div>
        <Card :bordered="false">
            <Form :model="replayForm">
                <FormItem prop="username">
                    <Col span="12">
                        <Input type="text"  :disabled="replayForm.item" v-model="replayForm.username" placeholder="昵称">
                        <Icon type="ios-person-outline" slot="prepend"></Icon>
                        </Input>
                    </Col>
                    <Col span="12">
                        <Input type="text"  :disabled="replayForm.item" v-model="replayForm.email" placeholder="个人邮箱">
                        <Icon type="ios-person-outline"></Icon>
                        </Input>
                    </Col>
                </FormItem>
                <FormItem label="留言内容" prop="content">
                    <Input v-model="replayForm.content" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请留下你的一点足迹吧！"></Input>
                </FormItem>
                <FormItem>
                    <Button type="primary" @click="handleSubmit()">发表</Button>
                </FormItem>
            </Form>
        </Card>
    </div>
</template>

<script>
    export default {
        name: "message",
        props:['replayForm'],
        data(){
            return{

            }
        },
        mounted(){
            console.log(this.replayForm);
        },
        methods:{
            handleSubmit(){
                 this.$emit('handleSubmit',this.replayForm);
            },
        }
    }
</script>

<style scoped>
.ivu-col:nth-of-type(1){
    padding: 0 10px 0 0;
}
.ivu-col:nth-of-type(2){
    padding: 0 0 0 10px;
}
</style>